package com.zzs.path.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Getter
@Setter
public class Node {

    // 基本信息
    Integer id;
    String name;
    Integer type;

    // 位置信息
    Integer x;
    Integer y;
    Integer z; // 层数
    String building;

    public Node(Integer id, String name, Integer type, Integer x, Integer y, Integer z, String building) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.x = x;
        this.y = y;
        this.z = z;
        this.building = building;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Node node = (Node) o;
        return Objects.equals(id, node.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
